package test.test_7_22;
/*
创建一个泛型类 Triple，
用来存储三种类型的对象，
并为每种类型提供获取方法。
 */
public class Demo04 {
    public static void main(String[] args) {
        Triple<String,Integer,Double> t = new Triple<>("abc",1,1.0);
        System.out.println(t.getT());
        System.out.println(t.getU());
        System.out.println(t.getV());


    }
}

class Triple<T,U,V> {
    private T t;
    private U u;
    private V v;

    public Triple() {
    }

    public Triple(T t, U u, V v) {
        this.t = t;
        this.u = u;
        this.v = v;
    }

    public T getT() {
        return t;
    }

    public U getU() {
        return u;
    }

    public V getV() {
        return v;
    }
}
